package ch1;

public class Visitor {
    String name;
    int age;

    public void show(){
        System.out.println("姓名：" + name);
        System.out.println("门票价格："+price());
    }
    public int price(){
        if(age<14||age>=60){
            return 0;
        }
        return 20;
    }

}


